
package com.aistar.order.config;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2016100900648430";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDujy+mPD+xuUiE5tcBZs6tM/bNsiNlO9N04gu/4YBXUfJMXA8sTdlJ2uc8t7S7FmUKOy3kZiqANt7sJQ7URUv02s14NdYOFaJzfUL1WD/v9caWeW6A5TRBjw2ckYdrRSSkL+7g0Dxd5uCfoUo7AXoIEmVCL0CMRx6FgjOBe07aTrxxWugPP4kSAqGCHPRDHk3+jGLdt5Xw+KYHpxuKM8uHYE2HRKoYhuBmih/1CXxbSMxVpdGGOj4qTqnYo5pB5BcAjBxZdoYV55VJxgczwkhW+xuVHoHmMyLVMN5Cu+7d6n8xq2/8xhV3IJV+0erxaw7xrCtlXCiGXQWkp9m07hpJAgMBAAECggEAEgAJ12A6ah2R5D1KwddRBu6h07l6RDw0Y2BfBJZuSahsQOi9WFlzaMg0pHc0Et3It/HpL4+p60y4m1bcfJXR+mK8GDLvuNZXEKHF+J81C9Ueq+HzvZQN0liJ7WNptWVdM2pOevYbZ/Zwwnq4ECW3YH6K12ibVTpUijxdyIpWU9Bxx+y2eReDQXCY86cnhmngi8uo6wcYCXzY2FwOWlO8e6IkIavs7t6SwEHEymbRVD8YuooOfKl0qb17JBsno/yaAlFFMJSiSD2qKYvzRHfXZuvjnJvFtSM9m2wrxGm+fCaQIWGrtzU/aI3jdH+gybE/bYuYc4oPiUbms3ZP/Gyv1QKBgQD82TJL/aaxu09vV/Y8G1RXHMBRvvk5AEsaD8LMPi0+3/ZNojwD9yiKphFmbTX8yaK9EQE4k5hdVk2YBrnGxyyW6oTe36npnRnAdjwW3aY/FhO19NTwkYv2XzjUIphTA9d9LLH69ZGCojCmZkNmfwMPRSKy/a7ajiv8AxIEqKSaFwKBgQDxiGUoycskogg7oCDcNZcuPZLgXpMh11Ee+5/VaW0QE9a6RkD+nW8GPiQURgwl5qHQ2l8R2BPblttjORMZdt+R82FK8Y0Y4WGPfv5TgUeUu5Ubke1m1SXDYuChQxvZQYHU7lyJ8wRlY3F173KMClkH98G+cS0RVHlPFkXggK6KnwKBgQCKru7Bc2y8y0o0fgCW0z6dUS3DKIY1141ZzA9CS1AxzlGgHz3fxu67rX6ZuYkFD+ts3CjZSUsm1rFUk0vOVWyFkjgyrmbZtctsHu2ydPw8WfWRtaoeERa9mVjoMdlunwrQo3UzewHGrwMUIb8SNtQMyhTQLAh948EIRv7ZA07VHQKBgQDTsRf4h+TkVp+gotgqKU432P/CZyHNp0oSPbf49E4CqWCqIqkUgCeu8QfuPPaowVtSEhMBMME21SGz9XIn/2g0I3xCkzN3exJnEocV6VkzorUtVNkeJ/LRLPh0Xr0pzaBdYAz7W2Oe+WmYVCWxV+Bwe1Xz9H3rkn5AMuVLv307QQKBgCOtYIFpkIjimZMV3HqjdYJpECvB0BzuqEfJMJT+ijrjo3tf4d1zFRHle0Rm048Xr6DazGZtRQ64KkmDh/tmx49NJDo6kq23CafZx7ljyRjpq++kiiIB3rQ8EyGJFkiYw1vroQvq2dKHr4DY8G6PEHY2q6Etc20bEuBN0JLSS0Pz";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxBVQW6ghomOdum6b+LJYgtoDEEbB0QyxIM1qSIgqFvu+rfvZvDgTEmb52zd1w19tGKMyAEgft/+mYb1IvapSrfOvEN0pO8xV81rvs6J7Prqkfnbt810Dg78s8GHkdav/3IsuK60EnwUl+YM/PcNoRvigYo2DqVHVkdv/rsdQpC8bjwT37LBxTi1zpWYzMqGmOsjTK3bIcEMnXk44/so98MeMC8BF60dsM/+ZzATaTF56gFyxvQEB6CQUqY4n+1iI65WjUjKk3PO2gZH2+4ajT+smqmE2S3KSwUn4QbcjF7RBCFIRTRtCiQdkzn5cF+vxNvOdC2Lwb60mfvBlW7gS1wIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://localhost:8081/ourtravel_base/PayServlet";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://localhost:801/xuchao/view/xc_success_order.html";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "D:/logs/";


    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_"
                    + System.currentTimeMillis() + ".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }


}